Opening and Closing Source Files

{bmc bm4.MRB}        To create a new source file

  1.  Choose New from the File menu.

  2.  Type your program into the new window.

 

New files are labeled  UNTITLED n  until they are saved.

 

Note  Before you can save or close a window it must be active. To make a window active, either click on the window or select the window name or number from the Window menu.

 

{bmc bm4.MRB}        To open an existing source file

  1.  From the File menu, choose Open.

  2.  If the file is on a network share, click the Network button to select the share.

  3.  Choose a drive from the Drives list box. The default drive is the current drive.

  4.  From the Directories list box, double-click a directory where the file is stored (or down a directory path to the directory where the file is stored.)

  5.  Choose a file type in the List Files of Type box. Only files with the chosen extension(s) are displayed in the File Name box.

  6.  Double-click a filename, or click a filename and choose OK.

 

The names of the four most recently opened files are displayed at the end of the File menu. To open one of these files, choose its name from the menu.

Because the editor works with any ASCII file, you can open and edit text files created with other editors.

When a source file is opened, its name is added to the Window menu. If you want to see more than one view of your source file, use the New Window command on the Window menu to open another view. A file can be opened only once; if you try to open a file that is already open, the file s window will activate, but the file will not be reloaded. You can, however, open multiple windows showing the same source file, so that you can, for instance, compare two different sections of the file. If more than one copy of the file is displayed, the window is titled filename:x, where x is a unique window number.

{bmc bm4.MRB}        To save a source file

  1.  Activate the source window.

  2.  From the File menu, choose Save.

  3.  If your file is unnamed, WinDbg displays the Save As dialog box. Enter the file s name. If you are using the sample program, name the file FIRST.C.

  4.  Select the drive and the directory to save the file to by choosing items from the Drives and Directories list boxes.

  5.  Choose OK.

 

If the file has already been named, the Save command saves any changes without displaying the Save As dialog box.

The title bar will display an asterisk (*) when the source file has been modified.

{bmc bm4.MRB}        To save a source file under a different name

  1.  Activate the source window.

  2.  From the File menu, choose Save As.

  3.  Type a new name for the file.

  4.  Choose OK.

 

This is useful for maintaining revised copies of a source file while keeping the original unchanged. You can also use the Save As command to name and save a newly created file.

{bmc bm4.MRB}        To save all open source files that are new or have been changed

    Choose Save All from the File menu.

 

{bmc bm4.MRB}        To close a source file

  1.  Activate the source window.

  2.  From the File menu, choose Close.

 

If you are using the sample program, use one of these techniques to close the FIRST.C source window.

If you create a new source file or modify an existing file and try to close it before saving, a message appears asking if you want to save the changes before closing.

{bmc bm4.MRB}        To activate a source window

    Click the title bar.

         - Or -

    Select it from the Window menu.

         - Or -

    Use the shortcut key listed on the title bar (ALT + # for windows 0 - 9,
ALT + CTRL + # for windows 10 - 19).

         - Or -

    Use CTRL + F6 to cycle through all active windows.

 

{bmc bm4.MRB}        To close a source window

  1.  Activate the source window.

  2.  Double-click the document Control-menu box.

 - or -

Press CTRL + F4.